﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Nantianmen.EntityFrameworkCore.Migrations.Postgresql
{
    /// <inheritdoc />
    public partial class AddClusterDestinations : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "ClusterDestinations",
                columns: table => new
                {
                    ClusterId = table.Column<string>(type: "text", nullable: false),
                    DestinationId = table.Column<string>(type: "text", nullable: false),
                    CreatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
                    UpdatedAt = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ClusterDestinations", x => new { x.ClusterId, x.DestinationId });
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "ClusterDestinations");
        }
    }
}
